package core;

import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.SpriteSheet;

public class SpriteVault
{
	public static SpriteSheet sheet = null;
	
	public static void loadSprites()
	{
		if(sheet != null)
			return;
		try
		{
			sheet = new SpriteSheet("res/sprites/spritesheet_towers.png", 32 , 32);
		} catch (SlickException e)
		{
			e.printStackTrace();
		}
	}
	
	public static Image getSprite(int num)
	{
		return sheet.getSubImage(num%10, num/10);
	}
}
